OnlineService

This class describes one online service to which Moneydance can connect. This is generally mean to mean a direct OFX service.

Constructors

Link copied to clipboard
constructor(book: AccountBook)
constructor(book: AccountBook, legacyInfo: StreamTable)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard

Returns the address book entry (if any) that is associated with this transaction.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected val bookStorage: LocalStorage
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var fIId: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:JvmName(name = "getFIUrlIsRedirect")
@set:JvmName(name = "setFIUrlIsRedirect")
var fiUrlIsRedirect: Boolean
Link copied to clipboard
Link copied to clipboard

If a syncable item is part of a grouped object, where multiple MoneydanceSyncableItems are part of the same syncable object, then this returns the parent object. An example is for SplitTxn which is not synced itself, but its associated ParentTxn is, so the SplitTxn class should override this method to return getParentTxn(). The default implementation here returns 'this'.

Link copied to clipboard
var info: SyncRecord
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open var isDirty: Boolean
Link copied to clipboard
protected var isInEditingMode: Boolean
Link copied to clipboard
protected open val isSyncable: Boolean
Link copied to clipboard

Store a reference to the given keywords (aka tags) in this object. Note this removes any tab characters

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@get:JvmName(name = "getOFXVersion")
val ofxVersion: String?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Return whether this item should be shown in the sidebar, which prefers a local file setting, followed by an object parameter, falling back to using defaultSidebarVisibility which returns true if the item would be expected to appear in the sidebar by default, such as in the case of bank, credit card, or investment accounts, or memorised reports and graphs.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val syncInfo: SyncRecord
Link copied to clipboard
open override val syncItemType: String

Subclasses should override this to return a static string identifying their type of object

Link copied to clipboard
open override val syncTimestamp: Long
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val UUID: String

Functions

Link copied to clipboard
fun addParameters(additionalParams: Map<String, String?>)

Add/merge all parameters from the given map that don't already have a key in the internal map

Link copied to clipboard

Set the TagSet associated with this object. This should only be called when initially constructing this object from old data files. In other words, DON'T USE THIS!

Link copied to clipboard
protected open fun autoSyncsChanges(): Boolean

Return true if any changes to this object are automatically synced

Link copied to clipboard
fun cacheAuthentication(authKey: String, authObj: String?)

Store an authentication object to be used later. If the given authObj is null, then it unsets the authentication.

Link copied to clipboard

Return true if this service can be used to download transactions for the given account. This will normally need to check if the account has an active identifier for this service and whether the account type is appropriate for the type of connection this service provides.

Link copied to clipboard

Clear the cache of all authentication objects.

Link copied to clipboard
Link copied to clipboard
open fun deleteItem(): Boolean

Deletes this item and writes a remove-item entry to the syncing system. Use with caution!

Link copied to clipboard
fun doesParameterExist(parameterName: String): Boolean
Link copied to clipboard
fun dumpInfo()
Link copied to clipboard

Return a clone of this object with the same backing info

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
fun getAccountParameter(acctNumKey: String?, acctIDKey: String?, defaultValue: Account?): Account?

Lookup and return an account that was referenced by this object using one of the given parameter names. Priority is given to acctIDKey which should reference the UUID of the account being referenced. If the acctIDKey lookup is not successfull then a lookup is done using the acctNumKey which references the integer account ID that is returned by getAccountNum() on the referenced account. If either acctNumKey or acctIDKey is null then that key is not checked for an account reference.

Link copied to clipboard
fun getAddressParameter(addressNumKey: String?, addressIDKey: String?, defaultValue: AddressBookEntry?): AddressBookEntry?

Lookup and return an address book entry that was referenced by this object using one of the given parameter names. Priority is given to addressIDKey which should reference the UUID of the address being referenced. If the addressIDKey lookup is not successfull then a lookup is done using the addressNumKey which references the integer address ID that is returned by getID() on the referenced account. If either addressNumKey or addressIDKey is null then that key is not checked for an account reference.

Link copied to clipboard
fun getAppID(defaultVal: String?): String?

Return the application ID to use when connecting to this bank.

Link copied to clipboard
fun getAppVersion(defaultVal: String?): String?

Return the application version to use when connecting to this bank.

Link copied to clipboard
fun getBooleanParameter(parameterName: String): Boolean?

Get the specified parameter as a boolean. If the given parameter does not have a value, or if it is not a boolean, return null

fun getBooleanParameter(parameterName: String, defaultVal: Boolean): Boolean

Get the specified parameter as a boolean. If the given parameter does not have a value, or if it is not a boolean, return the given default value

Link copied to clipboard

Retrieve the authentication object stored by the given key

Link copied to clipboard
Link copied to clipboard
fun getCurrencyParameter(parameterName: String, defaultValue: CurrencyType): CurrencyType

Lookup and return the currency referenced by this object using the given parameter key

fun getCurrencyParameter(currNumKey: String?, currIDKey: String?, defaultValue: CurrencyType?): CurrencyType?

Lookup and return a currency that was referenced by this object using one of the given parameter names. Priority is given to currIDKey which should reference the UUID of the currency being referenced. If the currIDKey lookup is not successfull then a lookup is done using the currNumKey which references the integer account ID that is returned by getID() method on the referenced currency. If either currNumKey or currIDKey is null then that key is not checked for a currency reference.

fun getCurrencyParameter(currNumKey: String?, currIDKey: String?, currencyIDString: String?, defaultValue: CurrencyType?): CurrencyType?

Lookup and return a currency that was referenced by this object using one of the given parameter names. Priority is given to currIDKey which should reference the UUID of the currency being referenced. If the currIDKey lookup is not successfull then a lookup is done using the currNumKey which references the integer account ID that is returned by getID() method on the referenced currency. If no currency has been found then the parameter value associated with the currencyIDString key is checked for a currency ID string (usually the three character ISO currency ID). Any of the parameters currNumKey, currIDKey, or currencyIDString can be null in which case that parameter is not checked for a currency reference.

Link copied to clipboard
fun getDoubleParameter(parameterName: String, defaultVal: Double): Double

Get the specified parameter as a double (64 bit) float. If the given parameter does not have a value, or if it is not an double, return the given defaul value

Link copied to clipboard

Returns the list of strings that was stored with setInlineStringListParameter, or null if the parameter has no value.

Link copied to clipboard
fun getIntParameter(parameterName: String, defaultVal: Int): Int

Get the specified parameter as an integer. If the given parameter does not have a value, or if it is not an integer, return the given defaul value

Link copied to clipboard
fun getLongParameter(parameterName: String): Long?

Get the specified parameter as a long. If the given parameter does not have a value, or if it is not a long, return null

fun getLongParameter(parameterName: String, defaultVal: Long): Long

Get the specified parameter as a long. If the given parameter does not have a value, or if it is not a long, return the given default value. This method was created as of build 254.

Link copied to clipboard

Gets the synchronization token for the info-wide mail list

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getMsgSetLanguage(messageType: Int): String?
Link copied to clipboard
Link copied to clipboard
fun getMsgSetSecurity(messageType: Int): String?
Link copied to clipboard
fun getMsgSetSignonRealm(messageType: Int): String?
Link copied to clipboard
fun getMsgSetSyncMode(messageType: Int): String?
Link copied to clipboard
Link copied to clipboard
fun getMsgSetURL(messageType: Int): URL?
Link copied to clipboard
fun getMsgSetVersion(messageType: Int): Int
Link copied to clipboard
Link copied to clipboard

If this is an editing copy of an item, return the original

Link copied to clipboard
fun getParameter(parameterName: String): String?

fun getParameter(parameterName: String, defaultStr: String?): String?

Get the specified parameter name. If the given parameter does not have a value, return the given defaultStr

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get the payee object that is associated with the given payment. The payment object must have a payee list ID for this to work.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun getPreference(key: String, defaultValue: String?): String?

Returns the String value associated with the given key in the local data file-specific preferences

Link copied to clipboard

Returns the boolean value associated with the given key in the local data file-specific preferences. If it's not found in the local datastore then check this object's syncable parameters for the same key

fun getPreferenceBoolean(key: String, defaultValue: Boolean): Boolean

Returns the boolean value associated with the given key in the local data file-specific preferences

Link copied to clipboard
fun getPreferenceDouble(key: String, defaultValue: Double): Double

Returns the double value associated with the given key in the local data file-specific preferences

Link copied to clipboard
fun getPreferenceInt(key: String, defaultValue: Int): Int

Returns the integer value associated with the given key in the local data file-specific preferences

Link copied to clipboard

Returns an array of integers from in the local data file-specific preferences that were stored using setPreference(String, int[])

Link copied to clipboard
fun getPreferenceLong(key: String, defaultValue: Long): Long

Returns the long value associated with the given key in the local data file-specific preferences

Link copied to clipboard

Return a list of string values that were stored with setPreference(key, ...) (ie in the local data file-specific preferences)

Link copied to clipboard
fun getPreferenceSublist(prefix: String): List<SyncRecord>

Returns a list of SyncRecord objects which were stored with setPreference(key, ...) in the local data file-specific preferences.

Link copied to clipboard
fun getPreferenceSubset(prefix: String): SyncRecord

Returns a new SyncRecord with the key-value pairs for which the keys have the given prefix in the local data file-specific preferences.

Link copied to clipboard
protected open fun getPrefKey(key: String): String
Link copied to clipboard
fun getSessionCookie(authKey: String?): String?

Get the session cookie associated with the given authentication key, if any.

Link copied to clipboard

Return a list of string values that were stored with setPreference(key, ...) (ie in the local data file-specific preferences)

Link copied to clipboard
fun getSublistParameter(prefix: String): List<SyncRecord>

Returns a list of SyncRecord objects which were stored with setParameter(key, sublist)

Link copied to clipboard
fun getSubsetParameter(prefix: String): SyncRecord

Returns a SyncRecord map which was stored with setParameter(key, Map)

Link copied to clipboard
Link copied to clipboard
fun getUserId(realm: String, account: OnlineAccountProxy?): String?

Get the best user ID to use with the given realm and account. If an account-specific user ID is not found, the realm-specific ID is used.

Link copied to clipboard

Returns true if this object has already been recorded as part of this data set. This can often be used to tell whether we're creating a new object or editing an existing one, for example in a transaction or account editor form.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun hasKeywordSubstring(matchString: String, caseSensitive: Boolean): Boolean
Link copied to clipboard
fun isSameAs(otherSvc: OnlineService?): Boolean
fun isSameAs(otherSvc: StreamTable?): Boolean
Link copied to clipboard
protected open fun itemWasUpdated()

This is called after an item is updated by calling itemWasUpdated(SyncRecord). This can occur from the syncing process or from being loaded locally. Override this method to be notified.

open override fun itemWasUpdated(syncInfo: SyncRecord)
Link copied to clipboard
protected open fun itemWillSync()

This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called. Override this method to be notified or if you'd like to store anything into the info record to be synced.

open override fun itemWillSync(syncInfo: SyncRecord)
Link copied to clipboard
fun mergeDataTables(table: Map<*, *>?)

This replaces any keys in the built-in info information with the keys and values from the given table. If the given table contains an "id" key then that is mapped to "tik_fi_id" so as not to overwrite the sacred "id" property of the service object.

Link copied to clipboard

Returns true if the FI information needs to be refreshed. This returns true if the force_fi_refresh flag is set in the service information or if the FI information hasn't been refreshed in at least a day and the no_fi_refresh flag isn't set in the info..

Link copied to clipboard
Link copied to clipboard
fun removeParameter(parameterName: String)

Remove the parameter with the given name.

Link copied to clipboard

Removes references to all of the current realms. DANGER!!

Link copied to clipboard
fun setAccountParameter(acctNumKey: String?, acctIDKey: String?, acct: Account?)

Store a reference to acct in this object using the given keys. The acctNumKey, if non-null, refers to the number returned by acct.getAccountNum(). The acctIDKey, if non-null, refers to the string returned by acct.getUUID() and will generally be more reliable and have a faster lookup time. If not storing references to accounts that have been migrated from before Moneydance 2015 then please only use the acctIDKey to store references.

Link copied to clipboard
fun setAddressParameter(oldAddressIDKey: String, addressIDKey: String, address: AddressBookEntry?)

Store a reference to address in this account using the keys. The acctNumKey, if non-null, refers to the number returned by address.getAccountNum(). The acctIDKey, if non-null, refers to the string returned by address.getUUID() and will generally be more reliable and have a faster lookup time. If not storing references to accounts that have been migrated from before Moneydance 2015 then please only use the acctIDKey to store references.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setCurrencyParameter(parameterName: String, currency: CurrencyType?)

Store a reference to the given currency in this object using the given parameter key.

fun setCurrencyParameter(currNumKey: String?, currIDKey: String?, curr: CurrencyType?)
fun setCurrencyParameter(currNumKey: String?, currIDKey: String?, currencyIDStringKey: String?, curr: CurrencyType?)

Store a reference to currency in this object using the given keys. The currNumKey, if non-null, refers to the number returned by curr.getID(). The currIDKey, if non-null, refers to the string returned by curr.getUUID() and will generally be more reliable and have a faster lookup time. If not storing references to accounts that have been migrated from before Moneydance 2015 then please only use the acctIDKey to store references.

Link copied to clipboard
protected open fun setDirty()

Marks this object as needing saving and puts it in a buffer for objects needing syncing

Link copied to clipboard

Put the object into "editing mode" in which no changes will be automatically saved until you call syncItem() on this. Note that calling duplicate() will put the new duplicate into editing mode automatically

Link copied to clipboard

Store the given list of strings in a single parameter, instead of the parameter-per-item that setParameter(name, List) stores. Read it back with getInlineStringListParameter.

Link copied to clipboard
Link copied to clipboard
fun setMailListSyncToken(account: OnlineAccountProxy?, syncToken: String?)

Sets the synchronization token for the info-wide mail list

Link copied to clipboard
fun setMaxPasswdLength(realm: String, val: Int)
Link copied to clipboard
fun setMinPasswdLength(realm: String, val: Int)
Link copied to clipboard
fun setMsgSetLanguage(messageType: Int, newVal: String?)
Link copied to clipboard
fun setMsgSetRspnsFileErrors(messageType: Int, newVal: Boolean)
Link copied to clipboard
fun setMsgSetSecurity(messageType: Int, newVal: String?)
Link copied to clipboard
fun setMsgSetSignonRealm(messageType: Int, newVal: String?)
Link copied to clipboard
fun setMsgSetSyncMode(messageType: Int, newVal: String?)
Link copied to clipboard
fun setMsgSetTransportSecure(messageType: Int, newVal: Boolean)
Link copied to clipboard
fun setMsgSetURL(messageType: Int, newVal: URL?)
Link copied to clipboard
fun setMsgSetVersion(messageType: Int, newVal: Int)
Link copied to clipboard
Link copied to clipboard
fun setParameter(parameterName: String, value: Boolean)
fun setParameter(parameterName: String, value: Boolean?)

Set the given parameter name to the given boolean value

fun setParameter(parameterName: String, parameterValue: Double)
fun setParameter(parameterName: String, parameterValue: Double?)

Set the given parameter name to the given double value

fun setParameter(parameterName: String, parameterValue: Int)
fun setParameter(parameterName: String, parameterValue: Int?)

Set the given parameter name to the given integer value

fun setParameter(parameterName: String, parameterValue: Long)
fun setParameter(parameterName: String, parameterValue: Long?)

Set the given parameter name to the given long value

fun setParameter(name: String, value: String?)
fun setParameter(name: String, value: List<*>?)
fun setParameter(name: String, value: Map<*, *>?)
Link copied to clipboard
fun setParameterNoNotify(parameterName: String, parameterValue: String)

Set the given parameter name to the given value but don't notify listeners of changes!

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setPasswdCharType(realm: String, val: String?)
Link copied to clipboard
fun setPasswdType(realm: String, val: String?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun setPreference(parameterName: String, value: Boolean)
fun setPreference(parameterName: String, value: Boolean?)

Set the given parameter name to the given boolean value, without sending an account-changed event, or recording the account as dirty.

fun setPreference(parameterName: String, value: Int)
fun setPreference(parameterName: String, value: Int?)

Set the given parameter name to the given integer value, without sending an account-changed event, or recording the account as dirty.

fun setPreference(parameterName: String, parameterValue: String?)

Set the given preference name to the given value and associate it with this object in local storage. This will not be synced and neither will it result in any modification notifications being triggered.

fun setPreference(prefix: String?, list: List<*>?)

Saves the given sublist into local storage, associated with this object. Values can be retrieved using getPreferenceSublist(prefix).

Link copied to clipboard

Sets a flag indicating that the info profile should be re-fetched

Link copied to clipboard
Link copied to clipboard
fun setSessionCookie(authKey: String, sessionCookie: String?)

Set the session cookie associated with the given authentication key

Link copied to clipboard

Sets the flag indicating the time that the info information was checked

Link copied to clipboard
Link copied to clipboard
fun setUserId(realm: String, account: OnlineAccountProxy?, userId: String?)
Link copied to clipboard
fun setUsesFITag(usesFITag: Boolean)

Sets whether or not this info is identified by an FI tag (ORG and ID)

Link copied to clipboard

Return whether or not the last date in a transaction download is decremented before storing it to use as the first date in the next transaction download. If this returns false (aka decrement_last_txn_date = n) then it is possible to avoid problems such as the one with Discover where they send the same transactions with different transaction IDs. Setting decrement_last_txn_date to false allows us to avoid overlapping date windows when downloading transactions.

Link copied to clipboard
fun supportsMsgSet(messageType: Int): Boolean
Link copied to clipboard

Call this to tell the storage that this item was changed and needs to be synced Please don't call this when either of the itemWasUpdated(..) methods are invoked unless you enjoy infinite loops as well as wasting bandwidth and disk space.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Returns true if this info is identified by an FI tag (ORG and ID) or not

Link copied to clipboard
Link copied to clipboard